package com.myinternet.lutu.controller;

import com.myinternet.lutu.modal.LessJsonResult;
import com.myinternet.lutu.modal.Resource;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/resource")
public class ResourceController {

    @Autowired
    private Resource resource;

    @RequestMapping("/getResource")
    public LessJsonResult getResource() {
        Resource bean = new Resource();
        BeanUtils.copyProperties(resource, bean);

        return  LessJsonResult.ok(bean);
    }
}
